package cn.chia.back.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Component;

import cn.chia.back.dao.IManagerDAO;
import cn.chia.pojo.TblUser;
@Component
public class ManagerDAOImpl extends HibernateDaoSupport implements IManagerDAO {

	@Autowired
	public ManagerDAOImpl(HibernateTemplate hibernateTemplate){
		super.setHibernateTemplate(hibernateTemplate);
	}
	
	public void doCreate(TblUser vo) throws Exception {
		// TODO Auto-generated method stub

	}

	public void doRemove(Integer id) throws Exception {
		// TODO Auto-generated method stub

	}

	public void doUpdate(TblUser vo) throws Exception {
		// TODO Auto-generated method stub

	}

	public List<TblUser> findAll() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public List<TblUser> findAll(int pageNo, int pageSize, String keyword,
			String column) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public TblUser findById(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public int getAllCount(String keyword, String column) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<?> findByUserPass(String username, String password) {
		return super.getHibernateTemplate().find("from TblUser where userName='"+username+"' and password='"+password+"'");
	}

}
